/*
 * ComboBoxToolTipRenderer.java
 *
 * Created on 6 juni 2007, 12:05
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package net.jwtools.tmt.ui.renderer;

import java.awt.Component;
import javax.swing.JList;
import javax.swing.plaf.basic.BasicComboBoxRenderer;

/**
 *
 * @author naftali
 */
public class ComboBoxToolTipRenderer extends BasicComboBoxRenderer {
    
    /** Creates a new instance of ComboBoxToolTipRenderer */
    
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
            setToolTipText( value.toString() );
        
        return this;
    }
}
